﻿// This software is the confidential and proprietary information of NetBay.
// Such confidential information should not be disclosed.
// NetBay copyright(c) 2012

#region

using NetBay.Core.BusinessEntities.Workflow;

#endregion

namespace Rio.Workflow.Runtime.Events
{
    public delegate void WorkflowFaultedEventHandler(object sender, WorkflowFaultedEventArgs args);

    public class WorkflowFaultedEventArgs : WorkflowEventArgs
    {
        #region Readonly & Static Fields

        private readonly string _error;

        #endregion

        #region Constructors

        /// <summary>
        /// Initializes a new instance of the <see cref="WorkflowEventArgs"/> class.
        /// </summary>
        /// <param name="instance">The instance.</param>
        /// <param name="error">The error.</param>
        internal WorkflowFaultedEventArgs(WorkflowInstance instance, string error)
            : base(instance)
        {
            _error = error;
        }

        #endregion

        #region Instance Properties

        /// <summary>
        /// Gets the error.
        /// </summary>
        /// <value>The error.</value>
        public string Error
        {
            get { return _error; }
        }

        #endregion
    }
}